#pragma once
#include <string>
#include <iostream>
#include <netinet/in.h>

namespace USER
{
    enum state
    {
        ONLINE,
        OFFLINE
    };
    using namespace std;
    
    class clientUser
    {
    public:
        std::string _name;
        //int _userID;
        std::string _IP; //做用户的唯一标识符
        int _sock;      //本地设备的信息传递的套接字
        state _state; 
        clientUser() : _sock(-1),_state(ONLINE)
        {}

        void clientUserInit(int sock)
        {
            cout << "请输入你的名字" << endl;
            string buffer;
            getline(cin, buffer);
            cout << "请输入你的本地IP" << endl;
            std::string ip;
            getline(cin, ip);
            _name = buffer;
            _IP = ip;
            _sock = sock;
        }

    };
    
}